package com.pth.action;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;
import com.pth.model.UserInfo;
import com.pth.service.UserInfoService;

@SuppressWarnings("serial")
public class ChaxunAction extends ActionSupport {

	private UserInfo userinfo;
	private UserInfoService infoService;
	
	public UserInfoService getInfoService() {
		return infoService;
	}

	public void setInfoService(UserInfoService infoService) {
		this.infoService = infoService;
	}

	@Override
	public String execute() throws Exception {

		UserInfo u=(UserInfo)ServletActionContext.getRequest().getSession().getAttribute("userinfo");
		userinfo=infoService.getInfoByCard(u.getIdentitycard());
		return SUCCESS;
	}

	public void setUserinfo(UserInfo userinfo) {
		this.userinfo = userinfo;
	}

	public UserInfo getUserinfo() {
		return userinfo;
	}
	
	
}
